package org.cyx.javasx;

import javax.swing.JButton;

import org.cyx.javasx.annotation.ComponentGet;
import org.cyx.javasx.layout.SxFrame;
import org.cyx.javasx.view.impl.CJButton;

import java.awt.event.ActionEvent;

/**
 * 主页面入口
 */
public class Main extends SxFrame {

    @ComponentGet(id = "btn_dump")
    private CJButton btn;
    @ComponentGet(id = "btn_dump")
    private JButton btn2;

    @Override
    protected void onCreate() {
        setLayout("main_layout.xml");// 指定主页面布局的xml
        btn.addActionListener((ActionEvent e) -> {
            System.out.println("点击:"+btn.getText());
        });
    }
}
